package com.bidevalution.business.service;

import com.bidevalution.dao.entity.BeReplyEnroll;
import com.bidevalution.dao.entity.BeSectionParticipant;
import com.qtp.core.model.Paging;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

/**
 * @description:
 * @author: xiayf
 * @date: 2019-06-11 11:57
 * 答辩单位信息业务层接口
 */
public interface BeReplyEnrollService {
	List<BeReplyEnroll> selectByEnterpriseCode(String orgCode,String sectionId);
	BeReplyEnroll selectById(String seqId);
	BeReplyEnroll selectByStreamId(String streamId);
    /**
     * 保存答辩单位信息
     *
     * @param list
     * @return
     * @throws Exception
     */
    boolean insertBeReplyEnroll(List<BeSectionParticipant> list, String replyId) throws Exception;

    /**
     * 根据答辩题目id删除答辩单位
     *
     * @param replyId
     * @return
     * @throws Exception
     */
    boolean deleteByReplyId(String replyId) throws Exception;

    /**
     * 根据答辩题目id查询出答辩单位列表
     *
     * @param paramsMap
     * @return
     */
    Paging<List<BeReplyEnroll>> selectReplyEnrollList(Map<String, Object> paramsMap) throws Exception;

    /**
     * 更新身份认证状态
     *
     * @param creditCodes
     * @param replyId
     * @return
     * @throws Exception
     */
    boolean updateIdentityState(String creditCodes, String replyId) throws Exception;

    
    void updateIdentity(BeReplyEnroll beReplyEnroll) throws Exception;


    List<BeReplyEnroll> getIdentityEnrollList(String replyId) throws Exception;

    /**
     * 查询投标单位答辩结果信息
     * @param seqId
     * @return
     * @throws Exception
     */
    BeReplyEnroll selectByPrimaryKey(String seqId) throws Exception;
    long selectCountByReplyId(@Param("replyId") String replyId);

    /**
     * 查询某个题目某个状态的投标单位家数
     *
     * @param replyId
     * @param isPublish 是否答辩完成：Y 是、N 否
     * @return
     */
    int getCountByIsPublish(String replyId, String isPublish);
}
